LooksLike (string, mask)

Basic and Crystal syntax.

Arguments
Returns

Boolean Value

Action

Enables you to locate field values using a standard DOS wildcard (? = wildcard for single character, * = wildcard for any number of characters). It does this by comparing a string to a mask that contains one or more wildcards. The function returns True if the string matches the mask and False if the string does not match the mask.

Typical uses

Use this function whenever you want to locate records based on two or more field values that are spelled differently yet look alike (have an essentially similar structure).

Examples

The following examples are applicable to both Basic and Crystal syntax:

LooksLike ("Snyder","Sn?der")

Returns TRUE.

LooksLike ("Schneider","S?der")

Returns FALSE.

LooksLike ("Schneider", "S?????der")

Returns TRUE.

The following example is applicable to Crystal syntax:

If LooksLike ({customer.CONTACT FIRST NAME},"?ris" Then

    {customer.CONTACT FIRST NAME}

Else

    ""

Returns Cris, Kris, and Iris, but not Chris (assuming all of these values are in the {customer.CONTACT FIRST NAME} database).



Seagate Software IMG Holdings, Inc.
http://www.seagatesoftware.com
Support services:
http://support.seagatesoftware.com